<?php
/*
function get_data($url)
{
  $ch = curl_init();
  $timeout = 5;
  curl_setopt($ch,CURLOPT_URL,$url);
  curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
  $data = curl_exec($ch);
  curl_close($ch);
  return $data;
}

$returned_content = get_data('http://news.google.com/news?q=%22iphone%22&output=rss');

echo $returned_content;
*/
require_once 'rss_fetch.inc';

$url = 'http://news.google.com/news?q=%22imac%22&output=rss';
$rss = fetch_rss($url);

foreach ($rss->items as $item ) {
	$title = $item[title];
	$url   = $item[link];
	echo "<a href=$url>$title</a></li><br>";
}
?> 